import axios from './axios'

//上传考勤设备信息图片到服务器
// export function getQualityPartList(params) {
//     const url = '/ms/api/equip/upload'
//     return axios.post(url, params)
// }


// 质量管理模块

// 获取检查部位
export function getQualityPartList(params) {
    const url = '/ms/api/quality/part/list'
    return axios.get(url, params)
}
// 新增检查部位
export function qualityPartAdd(params) {
    const url = '/ms/api/quality/part/add'
    return axios.post(url, params)
}
// 修改检查部位
export function qualityPartEdit(params) {
    const url = '/ms/api/quality/part/edit'
    return axios.post(url, params)
}
// 删除检查部位
export function qualityPartDel(params) {
    const url = '/ms/api/quality/part/del/'
    return axios.post(url + params)
}

//批量导入材料
export function getImportExcel(params) {
    const url = '/ms/api/quality/part/importExcel'
    return axios.post(url, params)
}

// 获取检查记录
export function getQualityRecordList(params) {
    const url = '/ms/api/quality/check/list'
    return axios.get(url, params)
}
//问题上报
export function problemReportAdd(params) {
    const url = '/ms/api/quality/check/add'
    return axios.post(url, params)
}
//人员获取
export function getUserList(params) {
    const url = '/ms/api/quality/check/user/list'
    return axios.get(url, params)
}
//问题上报
export function problemReportDetails(params) {
    const url = '/ms/api/quality/check/desc'
    return axios.get(url, params)
}

// 提交处理流程
export function problemReportLog(params) {
    const url = '/ms/api/quality/check/log'
    return axios.post(url, params)
}


// 获取问题类型列表
export function getIssueTypeList(params) {
    const url = '/ms/api/quality/issue/type/list'
    return axios.get(url, params)
}

// 新增问题类型
export function getIssueTypeAdd(params) {
    const url = '/ms/api/quality/issue/type/add'
    return axios.post(url, params)
}
// 编辑问题类型
export function getIssueTypeEdit(params) {
    const url = '/ms/api/quality/issue/type/edit'
    return axios.post(url, params)
}
// 删除问题类型
export function getIssueTypeDel(params) {
    const url = '/ms/api/quality/issue/type/del/'
    return axios.post(url + params)
}
// 获取质量明细
export function getIssueList(params) {
    const url = '/ms/api/quality/issue/list'
    return axios.get(url, params)
}
// 新增质量明细
export function getIssueAdd(params) {
    const url = '/ms/api/quality/issue/add'
    return axios.post(url, params)
}
// 修改质量明细
export function getIssueEdit(params) {
    const url = '/ms/api/quality/issue/edit'
    return axios.post(url, params)
}
// 质量明细禁用、启用
export function getIssueEnable(params) {
    const url = '/ms/api/quality/issue/enable'
    return axios.get(url, params)
}
// 删除问题类型
export function getIssueDel(params) {
    const url = '/ms/api/quality/issue/del/'
    return axios.post(url + params)
}

// 获取统计分析
export function problemStatistics(params) {
    const url = '/ms/api/quality/check/statistics'
    return axios.get(url, params)
}
// 获取统计分析
export function problemIssueList(params) {
    const url = '/ms/api/quality/issue/list'
    return axios.get(url, params)
}
// 获取质量问题明细列表
export function issueDeptIdList(params) {
    const url = '/ms/api/quality/issue/deptIdList'
    return axios.get(url, params)
}
// 检查任务列表
export function getQualityTaskList(params) {
    const url = '/ms/api/quality/task/list'
    return axios.get(url, params)
}
// 检查任务统计
export function getQualityTaskNum(params) {
    const url = '/ms/api/quality/task/num'
    return axios.get(url, params)
}
// 添加检查任务
export function getQualityTaskAdd(params) {
    const url = '/ms/api/quality/task/add'
    return axios.post(url, params)
}
// 编辑检查任务
export function getQualityTaskEdit(params) {
    const url = '/ms/api/quality/task/edit'
    return axios.post(url, params)
}
// 删除检查任务
export function getQualityTaskDel(params) {
    const url = '/ms/api/quality/task/del/'
    return axios.post(url + params)
}
// 发布任务
export function getQualityTaskRelease(params) {
    const url = '/ms/api/quality/task/release'
    return axios.post(url, params)
}
// 检查任务详情
export function getQualityTaskDetailsList(params) {
    const url = '/ms/api/quality/task/detailsList'
    return axios.get(url, params)
}
// 检查信息详情
export function getQualityTaskExecDetailsList(params) {
    const url = '/ms/api/quality/task/execDetailsList'
    return axios.get(url, params)
}
// 检查信息数据
export function getQualityExecNum(params) {
    const url = '/ms/api/quality/task/execNum'
    return axios.get(url, params)
}
// 我的任务
export function getQualityTaskExecList(params) {
    const url = '/ms/api/quality/task/me/exec/list'
    return axios.get(url, params)
}
// 我的任务数据统计
export function getQualityTaskMeExecNum(params) {
    const url = '/ms/api/quality/task/me/exec/num'
    return axios.get(url, params)
}
// 完成任务
export function getQualityTaskExecComplete(params) {
    const url = '/ms/api/quality/task/exec/complete'
    return axios.post(url, params)
}
// 排查上报
export function getQualityTaskExecAdd(params) {
    const url = '/ms/api/quality/task/exec/add'
    return axios.post(url, params)
}
// 检查记录统计
export function getQualityTaskIndexExecNum(params) {
    const url = '/ms/api/quality/task/index/execNum'
    return axios.get(url, params)
}
// 检查记录
export function getQualityTaskIndexExecList(params) {
    const url = '/ms/api/quality/task/exec/list'
    return axios.get(url, params)
}

//问题上报导出
export function getQualityCheckExport(params) {
    const url = '/ms/api/quality/check/export'
    return axios.get(url, params)
}

//检查记录导出
export function getQualityTaskExport(params) {
    const url = '/ms/api/quality/task/exec/export'
    return axios.get(url, params)
}

// 删除隐患问题
export function getQualityIssueDel(params) {
    const url = '/ms/api/quality/check/del/'
    return axios.post(url + params)
}

// 删除巡查问题
export function getQualityCheckDel(params) {
    const url = '/ms/api/quality/task/exec/del/'
    return axios.post(url + params)
}
/*
* 罚款单
* */


//查询罚款单列表
export function getQualityFineList(params) {
    const url = '/ms/api/quality/fine/list'
    return axios.get(url, params)
}
export function getQualityFineNum(params) {
    const url = '/ms/api/quality/fine/num'
    return axios.get(url, params)
}

//添加罚款单
export function setQualityFineAdd(params) {
    const url = '/ms/api/quality/fine/add'
    return axios.post(url, params)
}
//审批/批准罚款单
export function setQualityFineComplete(params) {
    const url = '/ms/api/quality/fine/complete'
    return axios.post(url, params)
}
//删除罚款单
export function setQualityFineDel(params) {
    const url = '/ms/api/quality/fine/del/'
    return axios.post(url+params)
}

//导出质量罚款单
export function exportQualityFine(params) {
    const url = '/ms/api/quality/fine/export'
    return axios.get(url, params)
}


/*
*
* 整改通知单
*
* */
//整改通知单列表
export function getQualityRectifyList(params) {
    const url = '/ms/api/quality/rectify/list'
    return axios.get(url, params)
}
//整改通知单详情
export function getQualityRectifyDetails(params) {
    const url = '/ms/api/quality/rectify/details'
    return axios.get(url, params)
}
//删除整改通知单
export function setQualityRectifyDel(params) {
    const url = '/ms/api/quality/rectify/del/'
    return axios.post(url+params)
}
//添加整改通知单
export function setQualityRectifyAdd(params) {
    const url = '/ms/api/quality/rectify/add/'
    return axios.post(url,params)
}
//编辑整改通知单
export function setQualityRectifyEdit(params) {
    const url = '/ms/api/quality/rectify/edit/'
    return axios.post(url,params)
}
//整改通知单导出
export function getQualityRectifyExport(params) {
    const url = '/ms/api/quality/rectify/export'
    return axios.get(url, params)
}
